package nju.bishe.weibo.data;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * 
 * @author longwei.wu
 * 
 */
public class UserToken implements Parcelable {

	private String user_id;
	private String token;
	private String secret;
	private String userName;
	private byte[] icon;

	public UserToken() {

	}

	public UserToken(String user_id, String token, String secret,
			String userName) {
		this.user_id = user_id;
		this.token = token;
		this.secret = secret;
		this.userName = userName;
	}

	public String getUser_id() {
		return user_id;
	}

	public void setUser_id(String userId) {
		user_id = userId;
	}

	public String getToken() {
		return token;
	}

	public String getUserName() {
		return userName;
	}

	public void setUserName(String userName) {
		this.userName = userName;
	}

	public void setToken(String token) {
		this.token = token;
	}

	public String getSecret() {
		return secret;
	}

	public void setSecret(String secret) {
		this.secret = secret;
	}

	@Override
	public int describeContents() {
		// TODO Auto-generated method stub
		return 0;
	}

	@Override
	public void writeToParcel(Parcel dest, int flags) {
		// TODO Auto-generated method stub
		dest.writeString(user_id);
		dest.writeString(token);
		dest.writeString(secret);
		dest.writeString(userName);
	}

	public byte[] getIcon() {
		return icon;
	}

	public void setIcon(byte[] icon) {
		this.icon = icon;
	}

	public static final Parcelable.Creator<UserToken> CREATOR = new Parcelable.Creator<UserToken>() {
		public UserToken createFromParcel(Parcel in) {
			return new UserToken(in);
		}

		public UserToken[] newArray(int size) {
			return new UserToken[size];
		}
	};

	//
	private UserToken(Parcel in) {
		user_id = in.readString();
		token = in.readString();
		secret = in.readString();
		userName = in.readString();
	}

}
